/*
 * MDragWidget.h
 *
 *  Created on: 15.12.2009
 *      Author: apoi
 */

#ifndef MDRAGWIDGET_H_
#define MDRAGWIDGET_H_

#include <QFrame>
#include <QRect>

/**
 * An ugly class used by various lists-of-items's items to filter out mouseReleased events that
 * happen while we are finger-scrolling the list.
 *
 * Used in ImageSelectionList, CategoryView, WPCommentList, and SinglePostView (for some reason...)
 *
 * Essentially, MDragWidgetIsDragging() returns WPScrollArea::IsDragging().
 *
 * VisibleSize() is then also used by WPCommentListItem to calcualate its width, for whatever stupid
 * reason...
 *
 * This should be removed (and it /could/ be removed for the CheckableListItem lists), but more
 * difficult for how wpcommentlist behaves.
 */
class MDragWidget : public QFrame 
{
public:
    MDragWidget(QWidget *aParent) : QFrame(aParent) {};
    ~MDragWidget() {};
    virtual bool MDragWidgetIsDragging() const = 0;
    virtual QSize VisibleSize() const = 0;
};

#endif /* MDRAGWIDGET_H_ */
